unit CALENDARXLib_TLB;

// ************************************************************************ //
// WARNING                                                                    
// -------                                                                    
// The types declared in this file were generated from data read from a       
// Type Library. If this type library is explicitly or indirectly (via        
// another type library referring to this type library) re-imported, or the   
// 'Refresh' command of the Type Library Editor activated while editing the   
// Type Library, the contents of this file will be regenerated and all        
// manual modifications will be lost.                                         
// ************************************************************************ //

// PASTLWTR : 1.2
// File generated on 2008-1-15 8:53:50 from Type Library described below.

// ************************************************************************  //
// Type Lib: E:\Compent\calendarx11\CalendarX\CalendarX.ocx (1)
// LIBID: {B1853442-46A5-4045-AB83-CD751FA7952E}
// LCID: 0
// Helpfile: E:\Compent\calendarx11\CalendarX\CalendarX.hlp
// HelpString: CalendarX ActiveX Control module
// DepndLst: 
//   (1) v2.0 stdole, (C:\WINDOWS\system32\stdole2.tlb)
// ************************************************************************ //
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface

uses Windows, ActiveX, Classes, Graphics, OleCtrls, OleServer, StdVCL, Variants;
  


// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:        
//   Type Libraries     : LIBID_xxxx                                      
//   CoClasses          : CLASS_xxxx                                      
//   DISPInterfaces     : DIID_xxxx                                       
//   Non-DISP interfaces: IID_xxxx                                        
// *********************************************************************//
const
  // TypeLibrary Major and minor versions
  CALENDARXLibMajorVersion = 1;
  CALENDARXLibMinorVersion = 1;

  LIBID_CALENDARXLib: TGUID = '{B1853442-46A5-4045-AB83-CD751FA7952E}';

  DIID__DCalendarX: TGUID = '{80D1F240-E658-4163-A47B-D9308453EA51}';
  DIID__DCalendarXEvents: TGUID = '{6E1D6A7B-F9CA-455A-B692-77E1DA8F21BC}';
  CLASS_CalendarX: TGUID = '{F2E812ED-94D7-4340-8EC7-77AEE482B269}';
type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
  _DCalendarX = dispinterface;
  _DCalendarXEvents = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library                       
// (NOTE: Here we map each CoClass to its Default Interface)              
// *********************************************************************//
  CalendarX = _DCalendarX;


// *********************************************************************//
// DispIntf:  _DCalendarX
// Flags:     (4112) Hidden Dispatchable
// GUID:      {80D1F240-E658-4163-A47B-D9308453EA51}
// *********************************************************************//
  _DCalendarX = dispinterface
    ['{80D1F240-E658-4163-A47B-D9308453EA51}']
    procedure AboutBox; dispid -552;
    function Lunar2Solar: Smallint; dispid 16;
    function Solar2Lunar: Smallint; dispid 15;
    property LunarYear: Integer dispid 2;
    property SolarYear: Integer dispid 1;
    property TheHour: Smallint dispid 4;
    property LunarMonth: Smallint dispid 7;
    property LunarDay: Smallint dispid 6;
    property Animal: Smallint dispid 5;
    property LeapFlag: WordBool dispid 8;
    property GzMonth: Smallint dispid 12;
    property SolarMonth: Smallint dispid 10;
    property GzYear: Smallint dispid 11;
    property GzHour: Smallint dispid 14;
    property WeekDay: Smallint dispid 3;
    property SolarDay: Smallint dispid 9;
    property GzDay: Smallint dispid 13;
  end;

// *********************************************************************//
// DispIntf:  _DCalendarXEvents
// Flags:     (4096) Dispatchable
// GUID:      {6E1D6A7B-F9CA-455A-B692-77E1DA8F21BC}
// *********************************************************************//
  _DCalendarXEvents = dispinterface
    ['{6E1D6A7B-F9CA-455A-B692-77E1DA8F21BC}']
  end;


// *********************************************************************//
// OLE Control Proxy class declaration
// Control Name     : TCalendarX
// Help String      : CalendarX Control
// Default Interface: _DCalendarX
// Def. Intf. DISP? : Yes
// Event   Interface: _DCalendarXEvents
// TypeFlags        : (34) CanCreate Control
// *********************************************************************//
  TCalendarX = class(TOleControl)
  private
    FIntf: _DCalendarX;
    function  GetControlInterface: _DCalendarX;
  protected
    procedure CreateControl;
    procedure InitControlData; override;
  public
    procedure AboutBox;
    function Lunar2Solar: Smallint;
    function Solar2Lunar: Smallint;
    property  ControlInterface: _DCalendarX read GetControlInterface;
    property  DefaultInterface: _DCalendarX read GetControlInterface;
  published
    property Anchors;
    property LunarYear: Integer index 2 read GetIntegerProp write SetIntegerProp stored False;
    property SolarYear: Integer index 1 read GetIntegerProp write SetIntegerProp stored False;
    property TheHour: Smallint index 4 read GetSmallintProp write SetSmallintProp stored False;
    property LunarMonth: Smallint index 7 read GetSmallintProp write SetSmallintProp stored False;
    property LunarDay: Smallint index 6 read GetSmallintProp write SetSmallintProp stored False;
    property Animal: Smallint index 5 read GetSmallintProp write SetSmallintProp stored False;
    property LeapFlag: WordBool index 8 read GetWordBoolProp write SetWordBoolProp stored False;
    property GzMonth: Smallint index 12 read GetSmallintProp write SetSmallintProp stored False;
    property SolarMonth: Smallint index 10 read GetSmallintProp write SetSmallintProp stored False;
    property GzYear: Smallint index 11 read GetSmallintProp write SetSmallintProp stored False;
    property GzHour: Smallint index 14 read GetSmallintProp write SetSmallintProp stored False;
    property WeekDay: Smallint index 3 read GetSmallintProp write SetSmallintProp stored False;
    property SolarDay: Smallint index 9 read GetSmallintProp write SetSmallintProp stored False;
    property GzDay: Smallint index 13 read GetSmallintProp write SetSmallintProp stored False;
  end;

procedure Register;

resourcestring
  dtlServerPage = 'ActiveX';

  dtlOcxPage = 'ActiveX';

implementation

uses ComObj;

procedure TCalendarX.InitControlData;
const
  CControlData: TControlData2 = (
    ClassID: '{F2E812ED-94D7-4340-8EC7-77AEE482B269}';
    EventIID: '';
    EventCount: 0;
    EventDispIDs: nil;
    LicenseKey: nil (*HR:$80004005*);
    Flags: $00000000;
    Version: 401);
begin
  ControlData := @CControlData;
end;

procedure TCalendarX.CreateControl;

  procedure DoCreate;
  begin
    FIntf := IUnknown(OleObject) as _DCalendarX;
  end;

begin
  if FIntf = nil then DoCreate;
end;

function TCalendarX.GetControlInterface: _DCalendarX;
begin
  CreateControl;
  Result := FIntf;
end;

procedure TCalendarX.AboutBox;
begin
  DefaultInterface.AboutBox;
end;

function TCalendarX.Lunar2Solar: Smallint;
begin
  Result := DefaultInterface.Lunar2Solar;
end;

function TCalendarX.Solar2Lunar: Smallint;
begin
  Result := DefaultInterface.Solar2Lunar;
end;

procedure Register;
begin
  RegisterComponents(dtlOcxPage, [TCalendarX]);
end;

end.
